package com.ytc.restcontroller;


import com.ytc.mapper.KeywordMapper;
import com.ytc.model.Keyword;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
/**
 * 详细介绍类情况.
 *
 * @ClassName KeywordsSeviceImpl
 * @Author zk
 * @Date 2023/1/16
 * @Version 1.0
 */

@RestController
public class KeywordServiceImpl {
    @Autowired
    private KeywordMapper keywordMapper;

    @RequestMapping("queryKeywords")
    public List<Keyword> queryKeywords(){
        return keywordMapper.queryKeywords();
    }

    //柴晓颖：查询关键字关联关系回填
    @RequestMapping("queryKeywordsByBookid")
    public List<Keyword> queryKeywordsByBookid(@RequestParam("bookid") Integer bookid){
        return keywordMapper.queryKeywordsByBookid(bookid);
    }

}